package com.zhengshang.api.service.impl;

import com.zhengshang.api.domain.AppThirdColumnCategory;
import com.zhengshang.api.mapper.AppThirdColumnCategoryMapper;
import com.zhengshang.api.service.IAppThirdColumnCategoryService;
import com.zhengshang.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 影音分类Service业务层处理
 * 
 * @author zhengshang
 * @date 2022-04-11
 */
@Service
public class AppThirdColumnCategoryServiceImpl implements IAppThirdColumnCategoryService
{
    @Autowired
    private AppThirdColumnCategoryMapper appThirdColumnCategoryMapper;

    /**
     * 查询影音分类
     * 
     * @param thirdColumnCategoryId 影音分类ID
     * @return 影音分类
     */
    @Override
    public AppThirdColumnCategory selectAppThirdColumnCategoryById(Long thirdColumnCategoryId)
    {
        return appThirdColumnCategoryMapper.selectAppThirdColumnCategoryById(thirdColumnCategoryId);
    }

    @Override
    public AppThirdColumnCategory selectAppThirdColumnCategoryByName(String thirdColumnCategoryName) {
        return appThirdColumnCategoryMapper.selectAppThirdColumnCategoryByName(thirdColumnCategoryName);
    }

    /**
     * 查询影音分类列表
     * 
     * @param appThirdColumnCategory 影音分类
     * @return 影音分类
     */
    @Override
    public List<AppThirdColumnCategory> selectAppThirdColumnCategoryList(AppThirdColumnCategory appThirdColumnCategory)
    {
        return appThirdColumnCategoryMapper.selectAppThirdColumnCategoryList(appThirdColumnCategory);
    }

    /**
     * 查询影音分类列表
     *
     * @param appThirdColumnCategory 影音分类
     * @return 影音分类
     */
    @Override
    public List<Map<String, Object>> selectAppThirdColumnCategoryList1(AppThirdColumnCategory appThirdColumnCategory) {
        return appThirdColumnCategoryMapper.selectAppThirdColumnCategoryList1(appThirdColumnCategory);
    }

    /**
     * 新增影音分类
     * 
     * @param appThirdColumnCategory 影音分类
     * @return 结果
     */
    @Override
    public int insertAppThirdColumnCategory(AppThirdColumnCategory appThirdColumnCategory)
    {
        appThirdColumnCategory.setCreateTime(DateUtils.getNowDate());
        return appThirdColumnCategoryMapper.insertAppThirdColumnCategory(appThirdColumnCategory);
    }

    /**
     * 修改影音分类
     * 
     * @param appThirdColumnCategory 影音分类
     * @return 结果
     */
    @Override
    public int updateAppThirdColumnCategory(AppThirdColumnCategory appThirdColumnCategory)
    {
        appThirdColumnCategory.setUpdateTime(DateUtils.getNowDate());
        return appThirdColumnCategoryMapper.updateAppThirdColumnCategory(appThirdColumnCategory);
    }

    /**
     * 批量删除影音分类
     * 
     * @param thirdColumnCategoryIds 需要删除的影音分类ID
     * @return 结果
     */
    @Override
    public int deleteAppThirdColumnCategoryByIds(Long[] thirdColumnCategoryIds)
    {
        return appThirdColumnCategoryMapper.deleteAppThirdColumnCategoryByIds(thirdColumnCategoryIds);
    }

    /**
     * 删除影音分类信息
     * 
     * @param thirdColumnCategoryId 影音分类ID
     * @return 结果
     */
    @Override
    public int deleteAppThirdColumnCategoryById(Long thirdColumnCategoryId)
    {
        return appThirdColumnCategoryMapper.deleteAppThirdColumnCategoryById(thirdColumnCategoryId);
    }
}
